<?php
/*
 * @Description: 
 * @Author: QinTianyu
 * @Date: 2020-05-07 09:23:31
 * @LastEditors: QinTianyu
 * @LastEditTime: 2020-05-07 09:52:17
 */

namespace app\finance\admin;
use app\system\admin\Admin;
use app\finance\model\OtherType as OtherTypeModel;
use think\Db;
class OtherType extends Admin
{
    protected $hisiModel = 'OtherType';

    public function index()
    {
        if($this->request->isAjax()){

            $where      = $data = [];
            $page       = $this->request->param('page/d', 1);
            $limit      = $this->request->param('limit/d', 15);
            $data['data'] = Db::name('other_type')->limit($limit)->page($page)->order('id desc')->select();
            $data['count'] = Db::name('other_type')->count('id');
            $data['code']   = 0;
            return json($data);
        }
        return $this->fetch();
    }
}
